<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>大学详情</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f5f5f5;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }
        .container {
            width: 70%;
            padding: 20px;
            background: #fff;
            box-shadow: 0 0 10px rgba(0,0,0,0.1);
            border-radius: 10px;
            text-align: center;
        }
        .university-details {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border: 1px solid #ddd;
            padding: 10px;
            margin: 10px 0;
            border-radius: 5px;
        }
        .university-details img {
            max-width: 100px;
            border-radius: 5px;
        }
        .university-details div {
            flex-grow: 1;
            margin-left: 20px;
            text-align: left;
        }
        .back {
            background-color: #4CAF50;
            color: white;
            border: none;
            padding: 10px;
            border-radius: 5px;
            cursor: pointer;
        }
        .back:hover {
            background-color: #45a049;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>大学详情</h1>
        {% for uni in universities %}
            <div class="university-details">
                <img src="{{ uni.image_url }}" alt="{{ uni.name }}">
                <div>
                    <h2>{{ uni.name }}</h2>
                    <p>{{ uni.description }}</p>
                    <p>专业: {{ uni.majors }}</p>
                </div>
            </div>
        {% endfor %}
        <form action="/" method="get">
            <input type="submit" value="返回" class="back">
        </form>
    </div>
</body>
</html>
